<?php

namespace common\models\credit_app_tables;

use Yii;

/**
 * This is the model class for table "{{%order_audit}}".
 *
 * @property integer $a_id
 * @property integer $a_oid
 * @property string $a_type
 * @property string $a_results
 * @property string $a_details
 * @property string $a_remarks
 * @property integer $a_uid
 * @property string $a_uname
 * @property string $a_dateline
 * @property string $a_status
 * @property string $a_info
 * @property string $a_aucode
 */
class OrderAudit extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%order_audit}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_app');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['a_oid', 'a_details', 'a_remarks', 'a_uid', 'a_uname', 'a_dateline', 'a_info', 'a_aucode'], 'required'],
            [['a_oid', 'a_uid'], 'integer'],
            [['a_results', 'a_details', 'a_remarks', 'a_status', 'a_info'], 'string'],
            [['a_dateline'], 'safe'],
            [['a_type'], 'string', 'max' => 50],
            [['a_uname', 'a_aucode'], 'string', 'max' => 30],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'a_id' => Yii::t('app', 'A ID'),
            'a_oid' => Yii::t('app', '订单ID'),
            'a_type' => Yii::t('app', '审核类型'),
            'a_results' => Yii::t('app', 'A Results'),
            'a_details' => Yii::t('app', '详情'),
            'a_remarks' => Yii::t('app', '备注'),
            'a_uid' => Yii::t('app', 'A Uid'),
            'a_uname' => Yii::t('app', 'A Uname'),
            'a_dateline' => Yii::t('app', 'A Dateline'),
            'a_status' => Yii::t('app', 'A Status'),
            'a_info' => Yii::t('app', '订单信息'),
            'a_aucode' => Yii::t('app', '层审权限编码'),
        ];
    }
}
